package com.orchidea.uml.events
{
import com.orchidea.uml.model.document.Document;
import com.orchidea.uml.model.document.DocumentType;
import flash.events.Event;
    public class DocumentEvent extends Event
    {
        public static const      UPDATE : String = "documentupdate";
        public static const      CREATE : String = "documentcreate";
		public static const        OPEN : String = "documentopen";
		public static const       CLOSE : String = "documentclose";
		public static const      DELETE : String = "documentdelete";
		public static const        SAVE : String = "documentsave";
		public static const       SAVED : String = "documentsaved";

        /**
		 * Events that refer to a specific document (UPDATE, OPEN, CLOSE, DELETE, SAVE and SAVED)
		 * use this property to pass that document.
		 */
		public var reference : Document;

		/**
		 * Events that create new documents (CREATE) use this property to specify
		 * which kind of document to create. Must be one of the constants on the DocumentType class.
		 */
		public var documentType : DocumentType;

        public var documentTitle:String;

        public function DocumentEvent( type : String, bubbles : Boolean = false, cancelable : Boolean = false )
        {
            super(type, true, cancelable);
        }
    }
}